import { service as request} from '@/utils/request'

export function doAdd(data) {
    return request({
        url: '/system/menu',
        method: 'post',
        data
    })
}
export function doEdit(data) {
    return request({
        url: '/system/menu',
        method: 'put',
        data
    })
}
export function doDelete(id) {
    return request({
        url: `/system/menu/${id}`,
        method: 'delete'
    })
}
export function getOne(id) {
    return request({
        url: `/system/menu/${id}`,
        method: 'get'
    })
}
export function getTree(data) {
    return request({
        url: `/hawk/system/menu/search`,
        method: 'get',
        params: {
            name: data
        }
    })
}